﻿@model RonYee.Models.Order

@{
    ViewBag.Title = "完成订单？";
    Layout = "~/Views/Shared/_LayoutOfSecondPage.cshtml";
}
@using (Html.BeginForm("ClosedTheOrder", "Order", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div class="line_top">
  <input type="submit" id="Closed1" value="交易成功" class="Button1 ui-icons" />
</div>
<div class="box_padding">
    <h3><i class="ui-icons"></i>订单详细</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg"><div class="box_padding">
    <div class="border_line">
        <table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody>
        <tr>
          <th class="tdName">编号</th>
          <th class="tdName">提交人</th>
          <th class="tdName">学 号</th>
          <th class="tdName">状 态</th>
          <th class="tdName">联系方式</th>
          <th class="tdName">提交日期</th>
          <th class="tdName">总 价</th>
          <th class="tdName">财务费用</th>
        </tr>
        <tr>
          <td class="tdData">
              @Html.HiddenFor(model => model.OrderId)
              @Html.DisplayFor(model => model.OrderId)
          </td>
          <td class="tdData">@Html.DisplayFor(model => model.Username)</td>
          <td class="tdData">@Html.DisplayFor(model => model.UserNo)</td>
          <td class="tdData">
             @Enum.GetName(typeof(RonYee.Models.Enum.OrderState),Convert.ToInt32(Model.Status))
          </td>
          <td class="tdData">@Html.DisplayFor(model => model.Phone)</td>
          <td class="tdData">@Html.DisplayFor(model => model.OrderDate)</td>
          <td class="tdData">@Html.DisplayFor(model => model.Total)</td>
          <td class="tdData"><input type="text" id="Finance" name="Finance" /></td>
        </tr>
        </tbody></table>
        
        <p><h4 style=" color:Olive">@ViewBag.Error</h4></p>
        </div>
    </div></div>
    <div class="box_down ui-icons"></div>
    <h3><i class="ui-icons"></i>图书列表</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg"><div class="box_padding">
    <div class="border_line">
        <table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody>
        <tr>
          <th class="tdName">编号</th>
          <th class="tdName">ISBN</th>
          <th class="tdName">书名</th>
          <th class="tdName">数量</th>
          <th class="tdName">价格</th>
        </tr>
        @foreach (var item in (IEnumerable<RonYee.Models.OrderDetail>)ViewData["details"])
        { 
            <tr>
              <td class="tdData">
                 @item.OrderId
              </td>
              <td class="tdData">
                 @item.ISBN
              </td>
              <td class="tdData">
                 @item.BookName
              </td>
              <td class="tdData">
                 @item.Quantity
              </td>
              <td class="tdData">
                 @item.UnitPrice
              </td>
            </tr>
        }
        </tbody></table>

        </div>
    </div></div>
    <div class="box_down ui-icons"></div>
</div>

<div class="line_top">
  <input type="submit" id="Closed" value="交易成功" class="Button1 ui-icons" />
  <br />
</div>
}

